package com.etc.entity.annotation;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.etc.aop.springaop.IGiveGift;

public class BeanTestAnnotation {

	AnnotationConfigApplicationContext context = null;

	@Before
	public void before() {
		context = new AnnotationConfigApplicationContext("com.etc.entity.annotation");
	}

	@Test
	public void test1() {
		UsersDao ud = (UsersDao) context.getBean("usersDao");
		ud.add();
		ud.getList().forEach(System.out::println);

	}

}
